package exception.exception02;

import java.io.FileOutputStream;
import java.io.IOException;

public class FinallyDemo2 {
    public static void main(String[] args) {
        FileOutputStream fos = null;
        try{
            fos = new FileOutputStream("/a/a/a/fos.dat");
            System.out.println("运行中");
        }catch (IOException e){
            System.out.println("出现问题并解决了");
        }
        finally {
            try{
                fos.close();
            }catch (Exception e){
                System.out.println("不知道是谁异常");
            }
        }
        System.out.println("结束了");
    }
}
